// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env: "cloud1-2g7s81h60f3fd184"
})

// 云函数入口函数
const db = cloud.database()
exports.main = async (event, context) => {
  try {
    return await db.collection('Related_items').where({
      _openid:event.oi
    }).remove()
  } catch(e) {
    console.error(e)
  }
}